package com.imooc.enums;

/**
 * @author 逸尘风清
 * @date 2021/5/7
 * @time 13:58
 * 描述：
 */
public enum ErrorMsg {
    NULL_USERNAME_OR_PASSWORD(10001, "用户名或密码不能为空"),
    USERNAME_IS_EXIST(10002, "用户名已存在"),
    ERROR_PASSWORD(10003, "密码不合法"),
    ERROR_TWO_PASSWORD(10004, "两次密码输入不一样"),
    ERROR_USERNAME_OR_PASSWORD(10005, "用户名或密码错误"),
    ERROR_PARAMS(10006, "参数错误"),
    ERROR_INSERT_DATA(10007, "数据插入失败"),
    IS_ALREADY_DEFAULT_ADDRESS(10008, "已经是默认地址"),
    ERROR_UPDATE_DATA(10009, "数据更新失败"),
    STOCK_NOT_ENOUGH(10010, "库存不足"),
    USER_NOT_EXIST(10011, "用户不存在"),
    UPLOAD_FILE_SIZE_ERROR(10012, "上传文件大小异常"),

    SYSTEM_ERROR(50001, "系统异常");

    public  Integer code;
    public  String msg;

    ErrorMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
